package cn.nawang.ebeim.api.service;

import java.util.Map;

/**
 * @ClassName: AuthorizationCheckService
 * @Description: TODO
 * @author fanyb
 * @date Oct 26, 2015 8:22:25 PM
 * @version v1.0
 */
public interface AuthorizationCheckService {

  /**
   * 
   * @author fanyb
   * @Description: 授权校验
   * @param map
   * @param user
   * @return Map<String,Object>
   * @date Oct 27, 201510:49:37 AM
   *
   * @修改人
   * @修改日期
   */
  public Map<String, Object> authorizationCheck(Map<String, Object> map, String username,
      String code, String bindDevice, String bindDeviceName, String key);

  /**
   * 
   * @author fanyb
   * @Description: 无授权方式
   * @param map
   * @return boolean
   * @date Oct 26, 20158:24:43 PM
   *
   * @修改人
   * @修改日期
   */
  public boolean noAuthorizetionCheck(Map<String, Object> map, String username);

  /**
   * 
   * @author fanyb
   * @Description: key无关联设备
   * @param map
   * @return boolean
   * @date Oct 26, 20158:31:47 PM
   *
   * @修改人
   * @修改日期
   */
  public boolean keyNoBindCheck(Map<String, Object> map, String username, String code, String key);

  /**
   * 
   * @author fanyb
   * @Description: key关联设备
   * @param map
   * @return boolean
   * @date Oct 26, 20158:32:53 PM
   *
   * @修改人
   * @修改日期
   */
  public boolean keyBindCheck(Map<String, Object> map, String username, String code,
      String bindDevice, String bindDeviceName, String key);

  /**
   * 
   * @author fanyb
   * @Description: 授权码不关联设备
   * @param map
   * @return boolean
   * @date Oct 26, 20158:33:15 PM
   *
   * @修改人
   * @修改日期
   */
  public boolean authorizationCodeNoBindCheck(Map<String, Object> map, String username,
      String code);

  /**
   * 
   * @author fanyb
   * @Description: 授权码关联设备
   * @param map
   * @return boolean
   * @date Oct 26, 20158:33:37 PM
   *
   * @修改人
   * @修改日期
   */
  public boolean authorizationCodeBindCheck(Map<String, Object> map, String username, String code,
      String bindDevice, String bindDeviceName);

  /**
   * 
   * @author fanyb
   * @Description: 判断用户对应的授权方式是否过期
   * @param username
   * @return boolean
   * @date Oct 27, 20157:35:40 PM
   *
   * @修改人
   * @修改日期
   */
  public boolean isOverAuthTime(Map<String, Object> map, String username);

  /**
   * 
   * @author fanyb
   * @Description: 判断当前用户是否超过容量
   * @param username
   * @return boolean
   * @date Oct 27, 20157:38:10 PM
   *
   * @修改人
   * @修改日期
   */
  public boolean isOverCapacity(Map<String, Object> map, String username);
}
